package com.tbit.uqbike.webmanager.dao.log;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.tbit.config.datasource.DataSource;
import com.tbit.uqbike.object.pojo.PatrolLog;
import com.tbit.uqbike.object.pojo.statistics.ExportPowerLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 巡检日志Mapper接口
 *
 * @author jing
 * @date 2021-04-29
 */
@DS(DataSource.LOG)
public interface PatrolLogDao {

    /**
     * 查询巡检日志列表
     *
     * @param patrolLog 巡检日志
     * @return 巡检日志集合
     */
    public List<PatrolLog> selectPatrolLogList(PatrolLog patrolLog);

    /**
     * 按天统计
     *
     * @param patrolLog 巡检日志
     * @return 巡检日志集合
     */
    public List<Map<String, Object>> statisticsByTime(PatrolLog patrolLog);

    /**
     * 根据时间统计运维个人总数详情
     *
     * @param patrolLog 巡检日志
     * @return 巡检日志集合
     */
    public List<ExportPowerLog> selectByType(PatrolLog patrolLog);

    /**
     * 巡检上报驳回
     *
     * @param logId
     * @return
     */
    int reject(@Param("logId") Integer logId);
}
